package com.akkainaction.mailbox.config.actor;

import akka.actor.UntypedActor;

import java.util.concurrent.TimeUnit;

public class MailBoxActor extends UntypedActor {
    @Override
    public void onReceive(Object msg) throws Exception {
        System.out.println("接收到消息:" + msg);
        //睡眠30秒是为了测试邮箱的容量,因为邮箱的消费是顺序消费的,睡眠就会阻塞消费
        TimeUnit.SECONDS.sleep(5);
    }
}
